package com.wxq.ware.feign;


import com.wxq.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Product 商品服务远程接口 {@link ProductFeignService}
 */
@FeignClient("yomall-product")
public interface ProductFeignService {

    /**
     * 1.让所有请求过网关
     *  1）@FeignClient("yomall-gateway")
     *  2）/api/product/skuinfo/info/{skuId}
     *
     * 2.直接访问指定服务
     *  1）@FeignClient("yomall-product")
     *  2）/product/skuinfo/info/{skuId}
     *
     * 根据skuid查询sku名称
     * @param skuId
     * @return
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);
}
